package com.taniurakengo.sourceviewer;

import com.taniurakengo.sourceviewer.R;

import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Intent;
import android.view.Window;

/**
 * 
 * @author Taniura
 *
 */
public class SplashWindowActivity extends Activity {

	/**
	 * 
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.splashwindow_activity);
		
		try {
			//wait
			Handler hdl = new Handler();
			hdl.postDelayed(new splashHandler(), 1000);
			
		} catch (Exception e) {
			System.out.println(e.toString());
		}
		

	}

	/**
	 * 
	 * @author Taniura
	 *
	 */
	class splashHandler implements Runnable {
		public void run() {

			try {
				//open activity
				Intent intent = new Intent(getApplication(), FileBrowserActivity.class);
				startActivity(intent);
				
				//close splashwindow
				SplashWindowActivity.this.finish();
			} catch (Exception e) {
				System.out.println(e.toString());
			}

		}		
	}
	
    @Override
    protected void onResume() {
        super.onResume();
    }
    
    @Override
    protected void onSaveInstanceState(Bundle outState) {
    	super.onSaveInstanceState(outState);
    }

    @Override
    protected void onStop() {
        super.onStop();
    }
    
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }  
}
